package com.tnl.app.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.tnl.app.entity.Adcarouselposi;
import com.tnl.base.BaseDAO;


@Repository
public class AdcarouselposiDAO {
	private static final String SQL_GET_ID = "select * from tb_adcarousel_position  where id = ?";
	private static final String SQL_GET_NAME = "select * from tb_adcarousel_position  where Name = ?";
	private static final String SQL_GET_ALL = "select * from tb_adcarousel_position ";
	
	
	public List<Adcarouselposi> getALL() {

		return BaseDAO.queryForList(Adcarouselposi.class, SQL_GET_ALL);

	}
	
	
	
	public Adcarouselposi getById(int Id) {
		return  BaseDAO.queryForObject(Adcarouselposi.class, SQL_GET_ID, Id);
	}
	public Adcarouselposi getByName(String name){
		return  BaseDAO.queryForObject(Adcarouselposi.class, SQL_GET_NAME, name);
	}
	
	
}
